

<table width="953" align="center"   style="BORDER-RIGHT:#999 1px solid; border-bottom:#999 1px solid; border-left:#999 1px solid; 
        border-top:#999 1px solid;" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr> 
	<td height="44" colspan="2" valign="top"><table  width="100%" border="0" cellpadding="0" cellspacing="0">
	  <!--DWLayoutTable-->
	  <tr>
	    <td width="20" height="19" valign="top" bgcolor="#333333" style="border-bottom:#999999 2px solid;"><!--DWLayoutEmptyCell-->&nbsp;</td>
        <td width="644" valign="middle" bgcolor="#333333" class="style2" style="border-bottom:#999999 2px solid;">PAGINA
          PRINCIPAL - Bienvenido Usuario: {$usuario.nombre}</td>
        <td width="268" align="right" valign="middle" bgcolor="#333333" class="style2" style="border-bottom:#999999 2px solid;">[
          <a href="{$conf.html}/index.php?action=logout" class="blanco">Cerrar Sesion</a> ]</td>
	    <td bgcolor="#333333" style="border-bottom:#999999 2px solid;" width="19" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
	  </tr>
	  <tr>
	    <td height="25" colspan="4" align="center" valign="middle" bgcolor="#EBEBEB" style="border-bottom:#767676 2px solid ; border-top:#FFFFFF 1px solid">
		  <strong>
		    [&nbsp;&nbsp;
			{if $type < 3}
			  <a href="{$conf.html}/new_survey.php?a_id={$a_id}" class="negro">Nueva Encuesta</a>  &nbsp;|
			{/if}
			&nbsp;&nbsp;
			<a href="{$conf.html}/stadistics_survey.php" class="negro" > Estadisticas</a> &nbsp;&nbsp;
			{if $type eq 0}
			|&nbsp;&nbsp;
			
			  <a href="{$conf.html}/category.php" class="negro"> Categoria</a> &nbsp;&nbsp;|&nbsp;&nbsp; 
			  <a href="{$conf.html}/admin.php" class="negro">Usuarios</a> &nbsp;&nbsp;|&nbsp;&nbsp; 
			  <a href="#" class="negro">Plantillas</a>&nbsp;&nbsp; 
			  | &nbsp;
			  <a href="{$conf.html}/insert_answer.php?sid=0{*$data.sid*}&mode=questions" class="negro">Respuestas Predeterminadas</a> 
			{/if}  
			&nbsp;]	
			</strong>
			</td>
	  </tr>
	  
	  
	  
    </table></td>
  </tr>
  <tr>
    <td width="15" height="275" valign="top"  ><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td width="936" valign="top">
	
	<!--***********************************todo el cuerpo********************************-->
	{if $type < 3}
	<form action="{$conf.html}/index.php" method="post">
	<table    width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="215" height="28">&nbsp;</td>
          <td width="33">&nbsp;</td>
          <td width="49">&nbsp;</td>
          <td width="43"></td>
          <td width="742"></td>
      </tr>
      <tr>
        <td height="19" colspan="3" valign="top" ><strong >Filtrar Lista por Categoria: </strong></td>
          <td></td>
          <td></td>
      </tr>
      <tr>
        <td height="26" colspan="4" valign="top">
		  
		  <select name="lista_filtro" >
		    <option value="sel" {if $selected eq "sel"}selected{/if} >Listar Todas</option>
		    {section name="indice" loop=$survey.category.cid}
              <option value={$survey.category.cid[indice]} {if $selected eq $survey.category.cid[indice]}selected{/if}>{$survey.category.categoria[indice]}</option>
            {/section}
          
		    
		    
		    </select>
		   <input type="submit" name="boton_filtrar" value="Filtrar"  title="Filtrara encuestas de la categoria elegida"/></td>
          <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="38" colspan="2" valign="middle" class="error">{if $catActive==0}Categoria Desactivada {/if}</td>
          <td>&nbsp;</td>
        <td></td>
        <td></td>
      </tr>
      
      
      
      
      <tr>
        <td height="111" colspan="5" valign="top"><table   class="centro"  border="1" bordercolor="#999999" cellpadding="1" cellspacing="2">
          <!--DWLayoutTable-->
          
          
          <tr>
            <td width="242" height="23" valign="middle"   ><strong>Encuesta</strong></td>
                <td width="65" valign="middle"  ><strong>Estado</strong></td>
                <td width="108" valign="middle"  ><strong>Categoria</strong></td>
                <td width="80" valign="middle"  ><strong>Fecha Final </strong></td>
                <td width="81" valign="middle"  ><strong>Previsualizar</strong></td>
                <td width="69" valign="middle"  ><strong>Resultados</strong></td>
                <td width="35" valign="middle"  ><strong>Url</strong></td>
                <td width="55" valign="middle"  ><strong>Resetear</strong></td>
                <td width="59" valign="middle" ><strong>Modificar</strong></td>
                <td width="66" valign="middle"  ><strong>Eliminar</strong></td>
              </tr>
           
            
         {section name="as" loop=$survey.all_surveysNC.sid}<!--loop lee cuantos valores tiene esta matriz as empieza desde el inicio como contador-->
          <tr>
                <td height="23" valign="middle"  >{$survey.all_surveysNC.name[as]}</td>
		        <td valign="middle"  >
				  {if $survey.all_surveysNC.active[as] == "activo" }
				     <a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysNC.sid[as]}&mode=activar&active=0" class="negro" >activo</a>				  
				  {else}
				      <a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysNC.sid[as]}&mode=activar&active=1" class="negro">inactivo</a>				  
				  {/if}
				</td>
                <td valign="middle" >{$survey.all_surveysNC.category[as]}</td>
                <td  valign="middle" >{$survey.all_surveysNC.end_date[as]}</td>
                <td  valign="middle" ><a href="{$conf.html}/preview.php?sid={$survey.all_surveysNC.sid[as]}&preview_survey=1"  target="_blank" {*onClick="window.open('{$conf.html}/survey.php?sid={$survey.all_surveysNC.sid[as]}{*&preview_survey=1*}','mywindow','toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=450,height=400,left=30,top=30');"*}><img src="{$conf.images_html}/ver.gif" width="18" height="18" border="0" alt="muestra la encuesta "></a></td>
                <td valign="middle" ><a href="#" onClick="window.open('{$conf.html}/results.php?sid={$survey.all_surveysNC.sid[as]}&noLinks=1','mywindow','toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=450,height=400,left=30,top=30');"><img src="{$conf.images_html}/resul.jpg" width="16" height="16" border="0" alt="muestra los resultados de esta encuesta"></a></td>
                <td valign="middle" ><a href="#" onClick="window.open('{$conf.html}/url.php?sid={$survey.all_surveysNC.sid[as]}','ventanita','toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=450,height=400,left=30,top=30');"><img src="{$conf.images_html}/url2.gif" width="18" height="17"  border="0" alt="muestra la direccion de la encuesta para instalarla en cualquier lugar" ></a></td>
                <td valign="middle" ><a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysNC.sid[as]}&edit_survey_submit=1&clear_answers=1"><img src="{$conf.images_html}/reset.jpg" width="18" height="18" border="0" alt="elimina todos lo votos de esta encuesta"></a></td>
                <td valign="middle" ><a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysNC.sid[as]}"><img src="{$conf.images_html}/write.gif"  width="18" height="18" border="0" alt="modifica preguntas, respuestas, etc. de esta encuesta"></a></td>
                <td valign="middle" ><a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysNC.sid[as]}&edit_survey_submit=1&delete_survey=1"><img src="{$conf.images_html}/delete6.gif" width="18" height="18" border="0" alt="elimina esta encuesta"></a></td>
          </tr>
          
          
         {/section}
                  </table></td>
          </tr>
      <tr>
        <td height="21">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td></td>
          <td></td>
      </tr>
      <tr>
        <td height="21" align="center" valign="middle" bgcolor="#E2E2E2" style="BORDER-RIGHT:#999 1px solid; border-bottom:#999 1px solid; border-left:#999 1px solid; 
        border-top:#999 1px solid;"><span class="po">Encuestas Cerradas</span> </td>
          <td colspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!--DWLayoutTable-->
            <tr>
              <td width="867" height="21">&nbsp;</td>
                </tr>
          </table></td>
          </tr>
      <tr>
        <td height="92" colspan="5" valign="top"><table class="centro"  border="1" bordercolor="#999999" cellpadding="1" cellspacing="2">
          <!--DWLayoutTable-->
          <tr>
            <td width="242" height="23" valign="middle"   ><strong>Encuesta</strong></td>
                <td width="65" valign="middle"  ><strong>Estado</strong></td>
                <td width="108" valign="middle"  ><strong>Categoria</strong></td>
                <td width="80" valign="middle"  ><strong>Fecha Final </strong></td>
                <td width="81" valign="middle"  ><strong>Previsualizar</strong></td>
                <td width="69" valign="middle"  ><strong>Resultados</strong></td>
                <td width="35" valign="middle"  ><strong>Url</strong></td>
                <td width="55" valign="middle"  ><strong>Resetear</strong></td>
                <td width="59" valign="middle"   ><strong>Modificar</strong></td>
          <td width="66" valign="middle"   ><strong>Eliminar</strong></td>
          </tr>
		{section name="as" loop=$survey.all_surveysC.sid}  
          <tr>
            <td height="23" valign="middle"  >{$survey.all_surveysC.name[as]}</td>
                <td valign="middle"  >
				{if $survey.all_surveysC.active[as] == "activo" }
				     <a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysC.sid[as]}&mode=activar&active=0" class="negro">activo</a>				  
				{else}
				      <a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysC.sid[as]}&mode=activar&active=1" class="negro">inactivo</a>				  
				{/if}	
			</td>
                <td valign="middle" >{$survey.all_surveysC.category[as]}</td>
                <td valign="middle" >{$survey.all_surveysC.end_date[as]}</td>
                <td valign="middle" ><a href="{$conf.html}/preview.php?sid={$survey.all_surveysC.sid[as]}&preview_survey=1"  target="_blank" {*onClick="window.open('{$conf.html}/survey.php?sid={$survey.all_surveysC.sid[as]}{*&preview_survey=1*}','mywindow','toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=450,height=400,left=30,top=30');"*}><img src="{$conf.images_html}/ver.gif" width="18" height="18" border="0" alt="muestra la encuesta "></a></td>
                <td valign="middle" ><a href="#" onClick="window.open('{$conf.html}/results.php?sid={$survey.all_surveysC.sid[as]}&noLinks=1','mywindow','toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=450,height=400,left=30,top=30');"><img src="{$conf.images_html}/resul.jpg" width="16" height="16" border="0" alt="muestra los resultados de esta encuesta"></a></td>
                <td valign="middle" ><a href="#" onClick="window.open('{$conf.html}/url.php?url={$conf.html}&sid={$survey.all_surveysC.sid[as]}','ventanita','toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=450,height=400,left=30,top=30');"><img src="{$conf.images_html}/url2.gif" width="18" height="17"  border="0" alt="muestra la direccion de la encuesta para instalarla en cualquier lugar"></a></td>
                <td valign="middle" ><a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysC.sid[as]}&edit_survey_submit=1&clear_answers=1"><img src="{$conf.images_html}/reset.jpg" width="18" height="18" border="0" alt="elimina todos lo votos de esta encuesta"></a></td>
                <td valign="middle" ><a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysC.sid[as]}"><img src="{$conf.images_html}/write.gif"  width="18" height="18" border="0" alt="modifica preguntas, respuestas, etc. de esta encuesta"></a></td>
                <td valign="middle" ><a href="{$conf.html}/edit_survey.php?sid={$survey.all_surveysC.sid[as]}&edit_survey_submit=1&delete_survey=1"><img src="{$conf.images_html}/delete6.gif" width="18" height="18" border="0" alt="elimina esta encuesta"></a></td>
                </tr>
          
          
             {/section}
                        </table></td>
          </tr>
      <tr>
        <td height="31"></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
      </tr>
    </table>
	 </form>
	{/if}
	<!--***************************fin de todo el cuerpo********************************-->
	
	</td>
  </tr>
  
  <tr>
    <td height="26" colspan="2" valign="top" ><table style="border-top:#999 1px solid;"  width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
       <td height="26" align="center" valign="middle" bgcolor="#EBEBEB" style="border-top:#D7D7D7 2px solid; border-bottom:#D7D7D7 2px solid;"><strong> [
           <a href="{$conf.html}/index.php?action=logout" class="negro">Cerrar Sesion</a> ]</strong></td>
      </tr>
    </table></td>
  </tr>
</table>

